<template>
	<view class="page index">
		<view class="header">
			<nav-bar title="首页" :leftArrow="false">
			</nav-bar>
		</view>
		<view class="main">
			<swiper class="swiper">
				<swiper-item>
					<navigator url="/pages/index/weekly-publication/index" class="swiper-item">
						<view class="title">
							第五十六期活动周报
						</view>
						<view class="time">
							2023-03-13 —— 2023-03-19
						</view>
					</navigator>
				</swiper-item>
			</swiper>
			<view class="notice">
				<view class="poster">
					<image src="@/static/image/notice.png" mode="widthFix"></image>
				</view>
				<text>2023年度第一次活动即将开始签到</text>
			</view>
			<view class="layout portrait">
				<view class="title">
					<view class="left">
						我的画像
					</view>
				</view>
				<view class="container">
					<view class="portrait-container">
						<image src="" mode=""></image>
						<view class="tag-item tag1">
							<view class="portrait-item">
								<view class="poster">
									<image src="@/static/image/index/icon-1.png" mode="widthFix"></image>
								</view>
								<view class="text">
									<text>忠诚</text>
								</view>
							</view>
						</view>
						<view class="tag-item tag2">
							<view class="portrait-item">
								<view class="poster">
									<image src="@/static/image/index/icon-2.png" mode="widthFix"></image>
								</view>
								<view class="text">
									<text>阳光</text>
								</view>
							</view>
						</view>
						<view class="tag-item tag3">
							<view class="portrait-item">
								<view class="poster">
									<image src="@/static/image/index/icon-3.png" mode="widthFix"></image>
								</view>
								<view class="text">
									<text>美丽</text>
								</view>
							</view>
						</view>
						<view class="tag-item tag4">
							<view class="portrait-item">
								<view class="poster">
									<image src="@/static/image/index/icon-4.png" mode="widthFix"></image>
								</view>
								<view class="text">
									<text>和顺</text>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="layout ranking">
				<view class="title">
					<view class="left">
						排行榜
					</view>
					<view class="right">
						<navigator url="/pages/index/ranking-list/index" class="text">查看全部</navigator>
						<uni-icons type="forward" size="24rpx"></uni-icons>
					</view>
				</view>
				<view class="container">
					<view class="ranking-container">
						<view class="rank-type">
							<view :class="['type-item', (rankIndex === index) && 'select']"
								v-for="(item, index) in rankType" :key="index" @click="rankIndex = index">
								<text>{{item}}</text>
							</view>
						</view>
						<view class="rank">
							<view class="rank-item">
								<view class="poster">
									<image src="@/static/image/second.png" mode="widthFix"></image>
									<view class="avatar">
										<image src="" mode=""></image>
									</view>
								</view>
								<view class="name">
									昌新
								</view>
								<view class="integral">
									800积分
								</view>
							</view>
							<view class="rank-item">
								<view class="poster">
									<image src="@/static/image/first.png" mode="widthFix"></image>
									<view class="avatar">
										<image src="" mode=""></image>
									</view>
								</view>
								<view class="name">
									昌新
								</view>
								<view class="integral">
									800积分
								</view>
							</view>
							<view class="rank-item">
								<view class="poster">
									<image src="@/static/image/third.png" mode="widthFix"></image>
									<view class="avatar">
										<image src="" mode=""></image>
									</view>
								</view>
								<view class="name">
									昌新
								</view>
								<view class="integral">
									800积分
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="layout activation">
				<view class="title">
					<view class="left">
						活动风采
					</view>
					<view class="right">
						<navigator url="/pages/index/event-style/index" class="text">全部</navigator>
						<uni-icons type="forward" size="24rpx"></uni-icons>
					</view>
				</view>
				<view class="container">
					<view class="activation-list">
						<navigator url="/pages/index/event-style/event-style-details/index" class="list-item" v-for="(item, index) in [1,2,3,4]">
							<view class="poster">
								<image src="" mode=""></image>
							</view>
							<view class="active-message">
								<view class="title">
									“三会一课”活动
								</view>
								<view class="department">
									xx部门
								</view>
								<view class="time">
									2021-12-30
								</view>
							</view>
						</navigator>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				rankType: ['周优秀个人', '周优秀部门'],
				rankIndex: 0,
			}
		},
		onLoad() {},
		methods: {

		}
	}
</script>

<style lang="scss">
	@import "@/common/style/common.scss";

	.index {
		@include flex-c;

		>.header {
			flex: 0 0 auto;
		}

		>.main {
			flex: 1 0 0;
			overflow: auto;
			padding: 0 24rpx;

			.swiper {
				width: 100%;
				height: 400rpx;

				.swiper-item {
					width: 100%;
					height: 100%;
					background: #102C7D;
					border-radius: 16rpx;
					@include flex-c-center-center;
					color: #FFFFFF;
					font-weight: 600;
					>.title{
						font-size: 32rpx;
						padding: 0 0 30rpx;
					}
					>.time{
						font-size: 28rpx;
					}
				}
			}

			.notice {
				@include flex-r-start-center;
				margin: 48rpx 0;
				padding: 14rpx 26rpx;
				background-color: #F1F2F8;
				border-radius: 34rpx;

				.poster {
					@include avatar(40);
				}

				>text {
					padding-left: 14rpx;
					color: #4A4A4A;
					font-size: 24rpx;
				}
			}

			.layout {
				.title {
					@include flex-r-between-center;

					.left {
						color: #2C2C2C;
						font-size: 32rpx;
						font-weight: 600;
					}

					.right {
						@include flex-r-start-center;
						.text {
							color: #9B9B9B;
							font-size: 24rpx;
							padding: 0 8rpx;
						}
					}
				}
			}

			>.portrait {
				.container {
					padding: 34rpx 0 58rpx;
					@include flex-r-center-center;

					.portrait-container {
						@include circle(430);
						box-shadow: inset 0rpx 2rpx 48rpx 40rpx #DBECFF;
						@include flex-c-center-center;
						position: relative;
						>image{
							width: 234rpx;
							height: 260rpx;
							background-color: #3261A5;
						}
						.tag-item{
							position: absolute;
							@include flex-c-center-center;
							.portrait-item{
								position: relative;
								@include circle(110);
								@include flex-c-center-center;
								background-color: #FFFFFF;
								overflow: hidden;
								.poster{
									@include avatar(84);
								}
								.text{
									position: absolute;
									bottom: 0;
									width: 100%;
									color: #FFFFFF;
									font-size: 20rpx;
									padding: 8rpx 0;
									@include flex-r-center-center;
									>text{
										position: relative;
										z-index: 2;
									}
									&::after{
										content: '';
										display: block;
										position: absolute;
										z-index: 1;
										top: 0;
										left: 0;
										width: 100%;
										height: 100%;
										background-color: #000000;
										opacity: 0.42;
									}
								}
							}
						}
						.tag1{
							top: -42rpx;
							.portrait-item{
								border: #FE3B1F 4rpx solid;
							}
						}
						.tag2{
							right: -42rpx;
							.portrait-item{
								border: #FCD02F 4rpx solid;
							}
						}
						.tag3{
							left: -42rpx;
							.portrait-item{
								border: #7BCB53 4rpx solid;
							}
						}
						.tag4{
							bottom: -42rpx;
							.portrait-item{
								border: #4A90E2 4rpx solid;
							}
						}
					}
				}
			}

			>.ranking {
				.container {
					padding: 24rpx 0 36rpx;

					.ranking-container {
						background: linear-gradient(128deg, #EFF6FF 0%, #EDF4FF 62%, #FFFFFF 100%);
						box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(162, 162, 162, 0.5);
						border-radius: 16rpx;
						padding: 8rpx 0 0;

						.rank-type {
							@include flex-r;
							padding: 14rpx 0;
							border-bottom: #E6E6E6 solid 2rpx;

							.type-item {
								flex: 1;
								@include flex-r-center-center;

								>text {
									@include flex-r;
									color: #9B9B9B;
									font-size: 28rpx;
									line-height: 40rpx;
									font-weight: 600;
									padding: 6rpx;
								}

								&.select {
									text {
										color: #3261A5;
										border-bottom: #3261A5 solid 4rpx;
									}
								}
							}
						}

						.rank {
							padding: 48rpx 48rpx 24rpx;
							@include flex-r-between-start;
							.rank-item{
								@include flex-c-center-center;
								font-size: 24rpx;
								color: #4A4A4A;
								font-weight: 600;
								&:nth-of-type(2){
									font-size: 28rpx;
									.poster{
										width: 174rpx; 
										margin-top: -30rpx;
										.avatar{
											top: 62rpx;
											@include avatar(148);
										}
									}
								}
								.poster{
									position: relative;
									@include flex-c-center-center;
									width: 164rpx;
									.avatar{
										position: absolute;
										top: 60rpx;
										@include avatar(140);
										background-color: red;
									}
								}
								.name{
									line-height: 36rpx;
									padding: 15rpx 0 0;
								}
							}
						}
					}
				}
			}

			>.activation {
				.container {
					padding: 6rpx 0 20rpx;

					.activation-list {
						.list-item {
							@include flex-r-start-center;
							padding: 28rpx 0;
							border-bottom: #F2F2F2 solid 4rpx;

							&:last-child {
								border-bottom: none;
							}

							.poster {
								width: 290rpx;
								height: 160rpx;

								image {
									width: 100%;
									height: 100%;
									background-color: red;
								}
							}

							.active-message {
								padding-left: 28rpx;

								.title {
									font-size: 30rpx;
									font-weight: 600;
									color: #000000;
								}

								.department {
									padding: 24rpx 0 30rpx;
									color: #4A4A4A;
									font-size: 24rpx;
								}

								.time {
									color: #BAC1C5;
									font-size: 24rpx;
								}
							}
						}
					}
				}
			}

		}
	}
</style>
>>>>>>> zheng
